//1. 安装 npm i express
//2. 导入 express
const express = require('express');

//3. 创建服务对象
const app = express();

//4. 创建路由规则
app.get('/hello', (req, res) => {
  res.end('Hello Express');
});

app.get('/test', (req, res) => {
  res.end('this is a test');
});

//5. 监听端口 启动服务
app.listen(8080, () => {
  console.log('服务已经启动....');
})